<!--
/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-10-19 12:40
 * @version 1.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 * @description 段
 */
 -->
<template>
  <div class="x-render-segment" v-html="textPost.trim()"
       :style="{'font-size': fontSize + 'px','line-height': lineHeight+'px'}">
  </div>
</template>

<script>
export default {
  name: "MoSegment",
  props: {
    text: {
      type: String,
      default: ''
    },
    fontSize: {
      type: Number,
      default: 27
    },
    lineHeight: {
      type: Number,
      default: 30
    }
  },
  computed: {
    textPost: {
      get() {
        const {text} = this
        return '&emsp;&emsp;' + (text || '正文').trim()
      }
    }
  }
}
</script>

<style scoped lang="css">
.x-render-segment {
  width: 343px;
  font-size: 17px;
  text-align: justify;
  line-height: 30px;
  margin: 4px 0;
  font-weight: 500;
}
</style>
